Dominic has created an awesome HTML5 demo based on concepts from Super Mario. There is an editor “weltmeister”!
Via IndieGames.com
Dominic has created an awesome HTML5 demo based on concepts from Super Mario. There is an editor “weltmeister”!
Via IndieGames.com
In the following gallery you will be shown just how easy it is to download JSC, install, create a WebGL application (see the original) and run it in your WebGL enabled browser.
Would you want to program your shaders in C# instead? It would look something like this once implemented:
Update: See GLSL overview
Update: See WebGL Awesomeness
More examples: Shadertoy and Collada tron tank
More examples: Chocolux and take screenshot from 3d and Cubepaint
More examples: Raycolor and more and some dancing frogs? and a whale?
Something simple:
More examples: Ethanol
Update: GLSL minifier, and a small c++ demo
Update: For debugging and see WPF OpenGL.
Update: Photoshop effects
Update: Can we have COLLADA within HTML?
See also:
As advertised the developers will be able to seamlessly create flash sprites and java objects inside their javascript applications in C# via the jsc ultra offering. What if they could just drop some native source code and be able to reuse them in C#?
At the moment only the HTML web page is converted to DOM building code which looks like this under reflector.
In the future releases the native source codes could be parsed and placed in the correct location based on their namespace for their respective back-end compilers.
Seems like I will need source code parsers to pull it off. First step is to generate a stub. The next step would be to convert the native source to IL. If we go just for the first step, then one can surely benefit from some native language specific syntax constructs.
Update: The second pass would mean that the native back-end compiler does it’s job and jsc will go and decompile JVM or AVM to IL as jsc is not about compiling source to IL.
Then you could consume the AboutApplet.java in your javascript code like this:
42 var Applet1 = new AboutApplet();
43
44 Applet1.Method1(“hello world”);
45
46 var Applet1Element = Applet1.AttachAppletToDocument();
47
48 Applet1Element.style.border = “1px solid red”;
This will create a red java applet in your browser.
The AboutApplet.java should could look something like this:
1 // PromotionWebApplication1.AboutApplet.dll
2 package PromotionWebApplication1;
3
4 import java.applet.Applet;
5 import java.awt.Component;
6 import java.awt.Container;
7 import java.awt.image.ImageObserver;
8 import java.awt.Panel;
9
10 public final class AboutApplet extends Applet implements ImageObserver
11 {
12
13
14 public AboutApplet()
15 {
16 super();
17 }
18
19
20 public final void Method1(String p)
21 {
22 }
23
24 }
Ch
Cool features ahead. Including HTML5 🙂 Including an actual installer!
jsc has now a twitter feed!
PS. What about .class, .jar, .swf, .swc? 🙂 I surely would like to pull media from online .swf files just to be able to recompile them into my own application.
Hey Compiler that flash game there has nice logo and sound, could you go ahead and make them accessible for me in the code? Thanks! 🙂
Disclaimer: This is a quick and dirty post.
by mxgraph
The new Pre-build event looks like this:
C:\util\jsc\bin\jsc.meta.exe ReferenceWebSource /ProjectFileName:”$(ProjectPath)”
Seriously, the other day I saw a blog post about how to make T4 download source code for you. At first I thought, thats just insane. It is a serious security liability. You will compile source code which you may have not written.
Update: I added the link. How long until the computer will automatically link to the posts by description? 😀 5 years?
jsc.meta now supports this new command ReferenceWebSource, which basically scans your project and downloads references source files from the internet, compiles them, merges them, adds some attributes and adds the new assembly to your project as a reference. This opens up a whole new group of possibilites.
The upper projects are supposed to be external projects written by other developers. Your project is the ReferencingWebSource project. As you can see there are multiple folders in that project suffixed with WebSource. Each of those which has a references.txt file is basically a list of source codes on the web. They can point either to .vb or .cs.
ACME.X.WebSource.references.txt:
http://jsc.svn.sourceforge.net/viewvc/jsc/examples/java/ReferencingWebSource/MySnippetProject/ACME/Class1.cs
http://jsc.svn.sourceforge.net/viewvc/jsc/examples/java/ReferencingWebSource/MySnippetProjectVB/Class1.vb
The source code could be generated by the web server on the fly. Talk about WSDL in C# 🙂 And after the downloaded code is compiled jsc.meta could apply any additional IL translation it wants to on it. It could go ahead and infer new types from existing code…
After you load your project you should do a build. This will invoke the pre build event and update the dynamic reference.
Here is an example of how I can use it in my project. Remember those Class1 types are downloaded via HTTP GET.
This feature is new and not fault tolerant. Oh and this windows forms project is also compiled to java.
Update: Future extension points:
Someone like Tobey has been ceazy enough to actually go and implement Flash Player in javascript. How crazy is that? It’s awesome for multitude of reasons!
Code:
<body onload="new Gordon.Movie('trip.swf', {id: 'stage', width: 500, height: 400})"> <div id="stage"></div> </body>
Example:
Via Ajaxian
See also:
Now that I got your attention:
There is a new release for jsc with two new screencasts. This time around you are able to omit [Script] attribute and ditch the tools/build.bat. The jsc solution now includes the jsc.meta compiler which will talk to the other compilers for you.
I am also experimenting with pre compilers. For example the Forms example makes use of TextualUserControl and TextComponent. Without getting too technical they generate a new assembly and add the reference to your csproj file. This opens up some really interesting possibilities. I will talk more about this in future posts.
Future pre compilers in jsc solution could include automatic stub generators for java jar files and for flash swf and swc files.
Open java version:
Some time ago I had this idea to support Windows Forms in javascript. Recently I have started on implementing a new feature for the jsc solution in form of a metacompiler. What does this mean? You will be able to create a Windows Forms Application without referencing any of the ScriptCoreLib libraries which in turn also means you will not be required to explicitly mark your classes with the ScriptAttribute. With future releases the support for Windows forms could be extended to flash and java which in turn enables rapid application development :).
Contact me if you are interested in this technology and would like to buy it for your company.
TwentyTen is the codename for Visual Studio 2010. This is a project template for the beta version of TwentyTen.
Open this example in your browser.
Browse the source code for this example.
Orcas is the codename for Visual Studio 2008.
Open this example in your browser.
Browse the source code for this example.
The two examples shown above are actually project templates for visual studio. The zip files should be copied to your template folder.
Example:
C:\Users\arvo\Documents\Visual Studio 2008\Templates\ProjectTemplates
In the future releases this could be automated by an installer.
It will create the final glue to bind two object spaces together by automatically referencing the Base Class Library implementations within the set of ScriptCoreLib assemblies. The meta compiler could be used in the future to provide proxy services and alike to talk seamlessly over the network to the server or to a client side persistence service like SQLLite.
There are a few caveats:
PS2. The jsc compiler should be installed at c:\util\jsc\bin. If any of the examples have a relative reference to one of its assemblies and cannot find them you might want to edit their respective project files to reference by the absolute path instead.
Download jsc here. (Others already have!)
Today I have extended the ExposedFunctions example. In our scenario we have written a javascript library in c# with jsc and we would like to consume some of its exposed functionality. We are going to edit our html file with Visual Studio inside the WebApplication1 subproject.
In the previous version the API consumer was only able to set text and index fields.
This time around the consumer is able to optionally specify mouse handlers and invoke GetString function on demand in javascript.
In this html file I have added two new buttons to consume the exposed API. The Example2 button will react on mouseover and mouseout events. Clicking on the data will invoke the onclick handler in which we will invoke the C# code to provide us some text to be displayed.
Guess what – you can watch TV online at justin.tv!
If you would like to only see only the video in your browser window, you can use this code:
javascript: void (function () { if (document.location.host != ‘www.justin.tv’) { document.location = ‘http://www.justin.tv’; return; } var e = document.getElementById(‘jtv_live_flash’); while (document.body.firstChild != null) document.body.removeChild(document.body.firstChild); document.body.appendChild(e); e.style.position = ‘absolute’; e.style.top = ‘0px’; e.style.left=’0px’; e.style.width=’100%’; e.style.height=’100%’})();
What does this code do? It removes all non video elements and maximizes the video.
You should create a new bookmark button.
After creating such a button you can navigate to a video page from justin.tv and click that button.
I have tested this with two channels:
Oh, and those of you who watch Lost, visit http://bojabertv.blogspot.com/.
Update: To make your firefox window top most I suggest DeskPins.
DeskPins can be used to make any application topmost, that is, to keep it above all other windows. Just grab a pin from the DeskPins icon in the system notification area (a.k.a. taskbar tray) and click on any window. This functionality is identical to the “Always on Top” setting found in some programs. With DeskPins you can add this feature to any program!
There is finally a portal for JavaScript games. I will try to send some of mine to that portal 🙂 Good job Jacob!
Today I released another example project which demonstrates that you could develop an application for WPF but have it running as XBAP and additionally on flash player and javascript enabled browsers aswell.
In this application you are being aided in a comparison process and as a result you will get a preference list.
Othe r posts in this series:
I have created a new project template that demonstrates most of what jsc is capable of. Soon I will publish it on the sourceforge with a tutorial how to get started using it.
Long story short – Here is an application which demonstrates the following features all written in C#:
Update: Moved the example to sourceforge and removed the querystring switch.
The next game powered by jsc has been released. This game works on .net, on javascript and on flash player.
The game is also available at Newgrounds over here and at WidgetBox.
Use Internet Explorer to open the Windows Presentation Foundation (XBAP) version.
Use Internet Explorer or Safari to open the JavaScript version.
AvalonGalleryExample project demonstrates how jsc compiler can be used in software development.
The entire project was written in c# and here are it’s versions for the web:
PHP + JavaScript Version – renders a static view for the user and uses javascript to gain interactivity.
XBAP Version – runs as a .net application via ClickOnce
Flash Version – runs as a flash application
JavaScript Version – runs as javascript application
Years ago sourceforge.net did not provide support for php5 – until now. The next release for jsc will finally include a php project template.
For now you can have a look at the example show below, where the php will generate a correct html view of the application and the javascript will make it interactive. Nice huh?
Known bugs: There seems to be some issues with IE7 tho…
AvalonExampleGallery [source:svn] |
Some updates to the compiler and the framework.
Download jsc here. (Others already have!) Older releases are here.
Visit our google groups and the google site.
Tutorials to read when just starting with jsc:
This release contains the following Project Templates:
OrcasAvalonApplication – WPF Application, C# to JavaScript, C# to ActionScript
OrcasAppletApplication – C# to Java Applet
OrcasFlashApplication – C# to ActionScript
OrcasScriptApplication – C# to JavaScript
OrcasVisualBasicFlashApplication – VB.NET to ActionScript
OrcasVisualBasicScriptApplication – VB.NET to JavaScript
OrcasWebApplication – C# to JavaScript as Microsoft Web Application
OrcasWebSite – C# to JavaScript as Microsoft ASP.NET Web Site
OrcasJavaConsoleApplication – C# to Java as Console Application
OrcasNativeJavaConsoleApplication – C# to Java as Console Application with JNI bindings
Have a look at some old screencasts:
Have a look at the Avalon Gallery, note that it is actually a WPF Application.
JavaScript AvalonExampleGallery [source:svn] |
|
ActionScript AvalonExampleGallery [source:svn] |
Today I released another example project which demonstrates that you could develop an application for WPF but have it running as XBAP and additionally on flash player and javascript enabled browsers aswell.
The javascript version has been tested with the following browsers:
You can look at the published files here or you can look at the source code here and here.
Other posts in this series:
Some updates to the compiler and the framework.
Download jsc here. (Others already have!)
Added a WPF template.
Visit our google groups and the google site.
Tutorials to read when just starting with jsc:
This release contains the following Project Templates:
OrcasAvalonApplication – WPF Application, C# to JavaScript, C# to ActionScript
OrcasAppletApplication – C# to Java Applet
OrcasFlashApplication – C# to ActionScript
OrcasScriptApplication – C# to JavaScript
OrcasVisualBasicFlashApplication – VB.NET to ActionScript
OrcasVisualBasicScriptApplication – VB.NET to JavaScript
OrcasWebApplication – C# to JavaScript as Microsoft Web Application
OrcasWebSite – C# to JavaScript as Microsoft ASP.NET Web Site
OrcasJavaConsoleApplication – C# to Java as Console Application
OrcasNativeJavaConsoleApplication – C# to Java as Console Application with JNI bindings. (missing)
Have a look at some old screencasts:
This is a WPF application based on the new OrcasAvalonApplication template. In debug mode jsc is not invoked and you can develop and debug the application as a regular one yet in release mode, the jsc is invoked at the post build event effectivly creating a javascript and an actionscript version for you. This example uses LINQ. See it in SVN here.
What does this example do? Based on a list of flickr images and a filter that defines a part of the image to be matched it returns a list of images and loads them over the network.
JavaScript [source:svn] |
|
ActionScript [source:svn] |
While developing with jsc, one must keep in mind the limits as only a minimum featureset is supported.
Today I released an example project which demonstrates that you could develop an application for WPF but have it running as XBAP and additionally on flash player and javascript enabled browsers aswell. Isn’t this more like WPF Everywhere 🙂 ?
The javascript version has been tested with the following browsers:
You can look at the published files here or you can look at the source code here and here.
Some currently by ScriptCoreLib.Avalon library supported features are:
Neat huh?
Some updates to the compiler and the framework: Download jsc here. (Others already have!)
Added two Java project templates.
Visit our google groups.
Tutorials to read when just starting with jsc:
This release contains the following Project Templates:
OrcasAppletApplication – C# to Java Applet
OrcasFlashApplication – C# to ActionScript
OrcasScriptApplication – C# to JavaScript
OrcasVisualBasicFlashApplication – VB.NET to ActionScript
OrcasVisualBasicScriptApplication – VB.NET to JavaScript
OrcasWebApplication – C# to JavaScript as Microsoft Web Application
OrcasWebSite – C# to JavaScript as Microsoft ASP.NET Web Site
OrcasJavaConsoleApplication – C# to Java as Console Application
OrcasNativeJavaConsoleApplication – C# to Java as Console Application with JNI bindings.
Have a look at some old screencasts:
Some updates to the compiler and the framework: Download jsc here.
Most important update was fixing the virtual + override semantics for jsc:actionscript. It’ did not allow to combine multiple events for example.
Visit our google groups.
Tutorials to read when just starting with jsc:
This release contains the following Project Templates:
OrcasAppletApplication – C# to Java Applet
OrcasFlashApplication – C# to ActionScript
OrcasScriptApplication – C# To JavaScript
OrcasVisualBasicFlashApplication – VB.NET to ActionScript
OrcasVisualBasicScriptApplication – VB.NET to JavaScript
OrcasWebApplication – C# to JavaScript as Microsoft Web Application
OrcasWebSite – C# to JavaScript as Microsoft ASP.NET Web Site
Writing code in VB.NET for flash looks like this:
You can now play the classic minesweeper game in your browser.
MineSweeper |
NatureBoyTestPad |
A tutorial how to create such an application can be found here.
Well, it is the end of the year and I wanted to get as much done as possible with the javascript tycoon. I managed to add some road construction tools 🙂
Play it in your browser. Vote for it at tt forums. Look at the c# source code. Try jsc yourself.
You now can install javascript tycoon and javascript worm game inside youOS desktop.
View javascript tycoon directly. Vote for it.
View javascript tycoon as a youOS guest.
View javascript worm game as a youOS guest.
Ingame video:
My developer page is not up to date, but it should list all applications I have prepared for youOS. If you like those applications, rate the, this way my developer avatar gets a higher ranking on the scoreboard page.